package com.ming.core.web.listener;

import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.servlet.GuiceServletContextListener;
import com.ming.order.OrderModule;
import com.ming.user.UserModule;
import com.ming.user.test.TestModule;

public class GoogleGuiceServletContextListener extends GuiceServletContextListener {

	@Override
	protected Injector getInjector() {
		
//		return Guice.createInjector(new UserModule());
		//如果绑定多个module，需要像下面这样就可以了
		return Guice.createInjector(new UserModule(),new OrderModule(),new TestModule());
	}

}
